// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import 'babel-polyfill'
import Vue from 'vue'
import App from './App'
import router from './router'
import { Swipe, SwipeItem, Toast } from 'mint-ui'
import VueWechatTitle from 'vue-wechat-title'
import 'mint-ui/lib/style.css'
import '@/common/styles/index.styl'
import vueTap from 'v-tap'
// import wx from 'weixin-js-sdk'
// import axios from 'axios'

Vue.config.productionTip = false
Vue.use(vueTap)
Vue.use(VueWechatTitle)
Vue.component(Swipe.name, Swipe)
Vue.component(SwipeItem.name, SwipeItem)
Vue.component(Toast.name, Toast)
// Vue.component(Loadmore.name, Loadmore)

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  template: '<App/>',
  components: { App }
})

// Vue.prototype.wxShare = function () {
//   axios.get(`http://192.168.0.119:2018/weixin/sign?url='baidu.com'&apis=onMenuShareTimeline,onMenuShareAppMessage`, {
//     headers: { Accept: 'application/vnd.sci.v2+json' }
//   }).then((res) => {
//     wx.config({
//       debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
//       appId: res.data.appid, // 必填，公众号的唯一标识
//       timestamp: res.data.timestamp, // 必填，生成签名的时间戳
//       nonceStr: res.data.noncestr, // 必填，生成签名的随机串
//       signature: res.data.signature, // 必填，签名，见附录1
//       jsApiList: res.data.jsApiList // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
//     })
//   })
//   wx.ready(function () {
//     wx.onMenuShareAppMessage({
//       title: '认筹test',
//       desc: '认筹test',
//       link: '',
//       imgUrl: 'http://piccdn.50yoga.cn/pics/public/sweet/images/share-title/.png',
//       success: function () {
//         console.log('分享成功')
//       }
//     })
//   })
// }
